package ifmo.compiler.task21.lexer.tokens;

/**
 * Base class for tokens.
 *
 * @author byaminov
 */
public abstract class Token<T> {

    protected TokenType type;

    protected Token(TokenType type) {
        this.type = type;
    }

    public TokenType getType() {
        return type;
    }

    public abstract T getValue();

    public String toString() {
        return String.valueOf(getValue());
    }
}
